package com.greenline.push.core.pushcenter.impl;

import javax.annotation.Resource;

import com.greenline.push.core.pushcenter.DomainAppChannelManager;
import com.greenline.push.dal.pushcenter.DomainAppChannelDAO;
import com.greenline.push.dal.pushcenter.dataobject.DomainAppChannelDO;
import com.greenline.push.dal.query.DomainAppChannelQuery;

public class DomainAppChannelManagerImpl implements DomainAppChannelManager {
    @Resource
    private DomainAppChannelDAO domainAppChannelDAO;

    @Override
    public Long insert(DomainAppChannelDO domainAppChannel) {
        return domainAppChannelDAO.insert(domainAppChannel);
    }

    @Override
    public DomainAppChannelDO getById(Long id) {
        return domainAppChannelDAO.findById(id);
    }

    @Override
    public boolean update(DomainAppChannelDO domainAppChannel) {
        return domainAppChannelDAO.update(domainAppChannel) > 0;
    }

    @Override
    public DomainAppChannelQuery listByQuery(DomainAppChannelQuery query) {
        return domainAppChannelDAO.listByQuery(query);
    }

    @Override
    public boolean delete(Long id) {
        return domainAppChannelDAO.delete(id) > 0;
    }

}
